<template>
  <div>
    <div class="boxt">
      <div class="title">{{ title }}</div> 
      <el-input
        label="title"
        v-model="lint"
        placeholder="请输入内容"
        style="width: 200px;"
        @input="change"
      ></el-input>
    </div>
  </div>
</template>

<script>
export default {
  name: "inputView",
  props: {
    title: {
      type: String,
    },
    value:{
      type:[String,Number]
    }
  },
  data() {
    return {
      lint:''
    };
  },
  created() {
  },
  watch:{
    value: {
        handler(newVal, oldVal) {
            // console.log(newVal, oldVal)
            this.lint = newVal
        },
        deep: true,
        immediate: true
    }

  },
  methods:{
    change(){
      this.$emit('input',this.lint)
    }
  }
};
</script>

<style lang="scss" >

.boxt{
    margin-right: 20px;
}
.title{
  font-size: 14px;
  font-weight: 400;
}
 ::v-deep .el-input__inner{
    height: 32px !important;
    margin-top: 5px;
 }
</style>